<?php
/*
 * description：
 * author：wh
 * email：
 * createTime：{2023/11/24} {18:02} 
 */

namespace app\webautocode\controller;


use think\Db;
use wanghua\general_utility_tools_php\tool\Tools;

class Test
{

    function index()
    {



        $obj = Db::table('fa_user_money_log');
        if(input('createtime')){
            $obj->where('createtime','egt',input('start_createtime'));
            $obj->where('createtime','elt',input('end_createtime'));
        }

        $obj->field('avg(money) as avg_money');

        $obj->where('memo','200');

        $obj->group('user_id');
        $data = $obj->select();
        dump($data);die;


        dump(__DIR__);die;
        //dump(substr('D:\wanghua\projects\mysql_web_sql_manage',-1));die;
        //$tab = Db::query('SELECT DATABASE() as name');


        //$str = ',url-fa_attachment,,use-fa_auth_group,,,,,,,';
        //
        //$arr = explode(',', $str);
        //// 示例数组
        //
        //$arr = array("hello", "world", "", "php", "", "is", "cool");
        //
        //
        //
        //$aa = Tools::delete_arr_empty_str($arr);
        //dump($aa);
        //$bbb = Tools::delete_str_empty_ele($str);
        //
        //dump($bbb);


    }
}